package e

const (
	SUCCESS        = 1   //成功
	ERROR          = 0   //失败
	INVALID_PARAMS = 400 //参数错误

	ERROR_UPLOAD_FAIL               = 10001
	ERROR_UPLOAD_SAVE_IMAGE_FAIL    = 10002
	ERROR_UPLOAD_CHECK_IMAGE_FAIL   = 10003
	ERROR_UPLOAD_CHECK_IMAGE_FORMAT = 10004

	ERROR_AUTH_CHECK_TOKEN_FAIL    = 20001
	ERROR_AUTH_CHECK_TOKEN_TIMEOUT = 20002
	ERROR_AUTH_TOKEN               = 20003
	ERROR_AUTH                     = 20004
)

var CodeMap = map[int]string{
	SUCCESS:                         "成功",
	ERROR:                           "失败",
	INVALID_PARAMS:                  "参数错误",
	ERROR_UPLOAD_FAIL:               "图片上传失败",
	ERROR_UPLOAD_SAVE_IMAGE_FAIL:    "保存图片失败",
	ERROR_UPLOAD_CHECK_IMAGE_FAIL:   "检查图片失败",
	ERROR_UPLOAD_CHECK_IMAGE_FORMAT: "校验图片错误，图片格式或大小有问题",
	ERROR_AUTH_CHECK_TOKEN_FAIL:     "Token鉴权失败",
	ERROR_AUTH_CHECK_TOKEN_TIMEOUT:  "Token已超时",
	ERROR_AUTH_TOKEN:                "Token生成失败",
	ERROR_AUTH:                      "Token错误",
}
